#!/bin/bash
#php error_log file removal
#this script just find error_log files on all /home folders and show it path and size and ask you to confirm 
#to delete the file or not

echo ""
echo "error_log files removal tool"
echo "dev: uidequalzero"
echo "v0.0-alpha"
echo ""
echo "comes with GPL v3 licnese"
echo "============================"
echo ""

if [ "$(id -u)" != "0" ]; then
   echo -e "\e[00;31mThis script must be run as root\e[00m" 1>&2
   echo "" 1>&2
   exit 1
fi


find /home/ -name "error_log" -type f -print  -exec /bin/ls -lh {} \; -exec rm -i {} \;
